if sxp.name(config) in ('vbd', 'tap'):
# The bootable flag is never written to the
# store as part of the device config.
- uuid = sxp.child_value(sxpr, 'uuid')
- sxpr.append(
- 'bootable',
- self['devices'][dev_uuid]['bootable'])
+ dev_uuid = sxp.child_value(config, 'uuid')
+ dev_type, dev_cfg = self['devices'][dev_uuid]
+ config.append(['bootable',
+ int(dev_cfg['bootable'])])
sxpr.append(['device', config])
found = True
def fixup_sxpr(sexpr):
ret = []
for k in sexpr:
- if type(k) in (types.ListType, types.TupleType):
+ if type(k) in (list, tuple):
if len(k) != 2 or k[0] != 'vcpu_avail':
ret.append(fixup_sxpr(k))
else: